package com.crm.config;

/**
 * @author zjd
 * @Title:
 * @Description:
 * @date 2021/4/214:21
 */
public class PaperServiceException extends RuntimeException {
    /**
     * 异常码
     * */
    private final String code;
    /**
     * 异常发生时请求url
     * */
    private final String url;
    /**
     * 异常信息
     * */
    private final String message;
    public PaperServiceException(){
        this.code = "230000";
        this.message = "无信息异常";
        this.url = "";
    }

    public PaperServiceException(String code,String message){
        this.code = code;
        this.message = message;
        this.url = "";
    }

    public PaperServiceException(String code,String url,String message){
        this.code = code;
        this.message = message;
        this.url = url;
    }
    public String getUrl() {
        return url;
    }

    public String getCode() {
        return code;
    }


    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "PaperServiceException{" +
                "错误码(code)=" + code +
                ", 请求地址(url)='" + url + '\'' +
                ", 详细信息(message)='" + message + '\'' +
                '}';
    }
}

